using System.Collections.Generic;

namespace Pentago.Core
{
    public enum Direction { Clockwise, CounterClockwise }
    public enum Marble { Black, White, Empty }

    public class GameBoard : IGameBoard
    {
        private readonly IDictionary<int, IGameBlock> gameBlocks;

        public GameBoard(IGameBlock gameBlock1, IGameBlock gameBlock2, IGameBlock gameBlock3, IGameBlock gameBlock4)
        {
            gameBlocks = new Dictionary<int, IGameBlock> {{1, gameBlock1}, {2, gameBlock2}, {3, gameBlock3}, {4, gameBlock4}};
        }

        public void PlaceMarble(int gameBlockidentifier, int location, Marble colour)
        {
            gameBlocks[gameBlockidentifier].Place(location, colour);
        }

        public void TwistBlock(int gameBlockidentifier, Direction direction)
        {
            gameBlocks[gameBlockidentifier].Twist(direction);
        }
    }
}